/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.MemberMakeCardType;
import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.*;

/**
 * ClassName: DeliveryRecord <br/>
 * Function: 配送记录 <br/>
 * date: 2018-12-04 11:14:55 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="delivery_records")
public class DeliveryRecord extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 制卡批次
	@ManyToOne
    @JoinColumn(name="batch_id")
	private BatchCardRecord batch = null;

	// 会员卡类型id 
    @Column(name="card_type_id")
	private Long cardTypeId = null;

	// 配送分店 
    @Column(name="branch_id")
	private Long branchId = null;

	// 配送分店
	@Column(name="branch_name")
	private String branchName = null;

	// 起始编号 
    @Column(name="start_no", length = 300)
	private String startNo = null;

	// 结束编号 
    @Column(name="end_no", length = 300)
	private String endNo = null;

	// 配送数量 
    @Column(name="count")
	private Integer count = 0;




	@Tolerate
	public DeliveryRecord() {
		
	}
    @Tolerate
	public DeliveryRecord(Long id){
    	super.setId(id);
    }


	/**
	 * 获取会员卡类型id
	 */
	public Long getCardTypeId() {
		return this.cardTypeId;
	}

    /**
     * 设置会员卡类型id
     */
	public DeliveryRecord setCardTypeId(Long cardTypeId) {
		this.cardTypeId = cardTypeId;
		return this;
	}

	/**
	 * 获取配送分店
	 */
	public Long getBranchId() {
		return this.branchId;
	}

    /**
     * 设置配送分店
     */
	public DeliveryRecord setBranchId(Long branchId) {
		this.branchId = branchId;
		return this;
	}

	/**
	 * 获取起始编号
	 */
	public String getStartNo() {
		return this.startNo;
	}

    /**
     * 设置起始编号
     */
	public DeliveryRecord setStartNo(String startNo) {
		this.startNo = startNo;
		return this;
	}

	/**
	 * 获取结束编号
	 */
	public String getEndNo() {
		return this.endNo;
	}

    /**
     * 设置结束编号
     */
	public DeliveryRecord setEndNo(String endNo) {
		this.endNo = endNo;
		return this;
	}

	/**
	 * 获取配送数量
	 */
	public Integer getCount() {
		return this.count;
	}

    /**
     * 设置配送数量
     */
	public DeliveryRecord setCount(Integer count) {
		this.count = count;
		return this;
	}

	public BatchCardRecord getBatch() {
		return batch;
	}

	public void setBatch(BatchCardRecord batch) {
		this.batch = batch;
	}

	public String getBranchName() {
		return branchName;
	}

	public void setBranchName(String branchName) {
		this.branchName = branchName;
	}

}
